<?php

namespace Database\Factories;

use App\Models\Teacher;
use App\Models\TeacherQualification;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Teacher>
 */
class TeacherQualificationFactory extends Factory
{
    protected $model = TeacherQualification::class;
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition()
    {
        $teacherIds = Teacher::all()->pluck('id');
        return [
            'teacher_id' => $teacherIds->random(),
            'qualification_name' => fake()->randomElement(['计算机二级','计算机三级','计算机四级'
                ,'英语二级','英语三级','英语四级']),
            'issuing_organization' => fake()->company(),
            'qualification_level' => fake()->randomElement(['低级','中级','高级']),
        ];
    }
}
